import { combineReducers } from 'redux'
import configureStore from './CreateStore'
import rootSaga from '../Sagas/'

export default () => {
  /* ------------- Assemble The Reducers ------------- */
  const rootReducer = combineReducers({
    comment: require('./CommentRedux').reducer,
    coupon: require('./CouponRedux').reducer,
    city: require('./CityRedux').reducer,
    nav: require('./NavigationRedux').reducer,
    user: require('./UserRedux').reducer,
    address: require('./AddressRedux').reducer,
    commodity: require('./CommodityRedux').reducer,
    commodityDetail: require('./CommodityDetailRedux').reducer,
    commodityCategory: require('./CommodityCategoryRedux').reducer,
    server: require('./ServerRedux').reducer,
    serverDetail: require('./ServerDetailRedux').reducer,
    serverCommodity: require('./ServerCommodityRedux').reducer,
    ad: require('./AdRedux').reducer,
    call: require('./CallRedux').reducer,
    order: require('./OrderRedux').reducer,
    orderDetail: require('./OrderDetailRedux').reducer,
    promotion: require('./PromotionRedux').reducer,
    login: require('./LoginRedux').reducer,
    register: require('./RegisterRedux').reducer,
    checkMobile: require('./CheckMobileRedux').reducer,
    validcode: require('./ValidcodeRedux').reducer,
    page: require('./PageRedux').reducer,
    todayRecommend: require('./TodayRecommendRedux').reducer,
    smallBanner: require('./SmallBannerRedux').reducer,
    pay: require('./PayRedux').reducer,
    alipay: require('./AlipayRedux').reducer,
    homeSmallBanner: require('./HomeSmallBannerRedux').reducer,
    vip: require('./VipRedux').reducer,
    wallet: require('./WalletRedux').reducer,
  })

  return configureStore(rootReducer, rootSaga)
}
